/*
 * @Author: xiaoyan
 * @Date: 2021-09-09 16:46:45
 * @LastEditors: xiaoyan
 * @LastEditTime: 2021-09-10 15:58:50
 * @Description: api
 * @FilePath: \vue-ts-basic\src\api\index.ts
 */
import {request} from '@/utils/request'

declare global {
    interface Window {
         conf: any;
    }
  }

const apiUrl = `${window.conf.backApi}/api/v1`;

//登录
export function login(data:any){
    return request({
        url: `${apiUrl}/login`,
        method: 'post',
        data,
    })
}
//获取用户信息
export function getUserInfo(){
    return request({
        url: `${apiUrl}/getUserInfo`,
        method: 'post',
    })
}
//退出
export function logout(){
    return request({
        url: `${apiUrl}/logout`,
        method: 'post',
    })
}